define(['jquery', 'underscore', 'collections/app', 'backbone', 'text!templates/stats.html'], function ($, _, app, Backbone, statsTemplate) {
  var appView = Backbone.View.extend({
    el: "#temp",
    template: _.template(statsTemplate),
    events: {
      "click .author":  "helloword",
      "click .play": "playCurrent"
    },
    initialize: function(){
      //app.remaining();
    },
    render: function () {
      var self = this;
      var stats = self.model.toJSON();
      //$.getJSON("js/data/1.json", function(cc){
          //$("#temp").html(self.template(cc));
      //});

      console.log(stats);
      $("#temp").html(self.template(stats[0]));
    },
    helloword: function(){
      var content = this.$('.author').html();
      console.log(content);
    },
    playCurrent: function (){
      
    }
  });

  return appView;
});